import request from '@/utils/request'

// 查询柜体信息列表
export function listCabinets(query) {
  return request({
    url: '/cabinets/cabinets/list',
    method: 'get',
    params: query
  })
}

// 查询柜体信息详细
export function getCabinets(cabinetId) {
  return request({
    url: '/cabinets/cabinets/' + cabinetId,
    method: 'get'
  })
}

// 新增柜体信息
export function addCabinets(data) {
  return request({
    url: '/cabinets/cabinets',
    method: 'post',
    data: data
  })
}

// 修改柜体信息
export function updateCabinets(data) {
  return request({
    url: '/cabinets/cabinets',
    method: 'put',
    data: data
  })
}

// 删除柜体信息
export function delCabinets(cabinetId) {
  return request({
    url: '/cabinets/cabinets/' + cabinetId,
    method: 'delete'
  })
}
